#ifndef __CASCADEFORMAT_H_ 
#define __CASCADEFORMAT_H_ 

#include <Format.h>
#include <LengthUnit.h>
#include <sstream>
#include <vector>
using std::vector;

#include <string>
using std::string;

#include <DataType.h>

typedef struct 
{
	UINT factorToBase;
	string     name;
} UnitData;

class CascadeFormat:public Format
{
public:
	void output(std::ostream&, const UINT&);
	CascadeFormat();
private:
	void addNewUnit(const UINT& factorToBase, const string& unitName);
        void formatWithUnit(std::ostream& sio,const UnitData& unitData, UINT& valueInBase, UINT& valueInUnit);
	vector<UnitData>  unitVector_m;
};

#endif
